package com.ruoyi.ucar.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.ucar.domain.TVehicleInfo;
import com.ruoyi.ucar.mapper.TVehicleInfoMapper;
import com.ruoyi.ucar.service.ITVehicleInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import lombok.AllArgsConstructor;

/**
 * 车辆信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-07-22
 */
@Service
@AllArgsConstructor
public class TVehicleInfoServiceImpl extends ServiceImpl<TVehicleInfoMapper, TVehicleInfo> implements ITVehicleInfoService
{

    @Autowired
    private   TVehicleInfoMapper tVehicleInfoMapper;

    /**
     * 查询车辆信息
     * @param id 车辆信息主键
     * @return 车辆信息
     */
    @Override
    public TVehicleInfo selectTVehicleInfoById(Long id)
    {
        return tVehicleInfoMapper.selectTVehicleInfoById(id);
    }

    /**
     * 查询车辆信息列表
     * @param tVehicleInfo 车辆信息
     * @return 车辆信息
     */
    @Override
    public List<TVehicleInfo> selectTVehicleInfoList(TVehicleInfo tVehicleInfo)
    {
        return tVehicleInfoMapper.selectTVehicleInfoList(tVehicleInfo);
    }

    /**
     * 新增车辆信息
     * @param tVehicleInfo 车辆信息
     * @return 结果
     */
    @Override
    public int insertTVehicleInfo(TVehicleInfo tVehicleInfo)
    {
    return tVehicleInfoMapper.insert(tVehicleInfo);

    }

    /**
     * 修改车辆信息
     * @param tVehicleInfo 车辆信息
     * @return 结果
     */
    @Override
    public int updateTVehicleInfo(TVehicleInfo tVehicleInfo)
    {
    return tVehicleInfoMapper.updateById(tVehicleInfo);
    }

    /**
     * 批量删除车辆信息
     * @param ids 需要删除的车辆信息主键
     * @return 结果
     */
    @Override
    public int deleteTVehicleInfoByIds(Long[] ids)
    {
        return tVehicleInfoMapper.deleteTVehicleInfoByIds(ids);
    }

    /**
     * 删除车辆信息信息
     * @param id 车辆信息主键
     * @return 结果
     */
    @Override
    public int deleteTVehicleInfoById(Long id)
    {
        return tVehicleInfoMapper.deleteTVehicleInfoById(id);
    }


}
